package com.care.dao.model;

import java.util.Date;
import javax.persistence.*;

@Table(name = "forum_comment")
public class ForumComment {
    /**
     * 评论主键
     */
    @Id
    @Column(name = "forum_comment_id")
    private Integer forumCommentId;

    /**
     * 帖子ID
     */
    @Column(name = "forum_id")
    private Integer forumId;

    /**
     * 用户ID
     */
    @Column(name = "user_id")
    private Integer userId;
    
    @Transient
    private User user;

    /**
     * 社区管理员ID
     */
    @Column(name = "admin_id")
    private Integer adminId;

    @Transient
    private Admin admin;
    
    /**
     * 评论时间
     */
    @Column(name = "publish_time")
    private Date publishTime;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 获取评论主键
     *
     * @return forum_comment_id - 评论主键
     */
    public Integer getForumCommentId() {
        return forumCommentId;
    }

    /**
     * 设置评论主键
     *
     * @param forumCommentId 评论主键
     */
    public void setForumCommentId(Integer forumCommentId) {
        this.forumCommentId = forumCommentId;
    }

    /**
     * 获取帖子ID
     *
     * @return forum_id - 帖子ID
     */
    public Integer getForumId() {
        return forumId;
    }

    /**
     * 设置帖子ID
     *
     * @param forumId 帖子ID
     */
    public void setForumId(Integer forumId) {
        this.forumId = forumId;
    }

    /**
     * 获取用户ID
     *
     * @return user_id - 用户ID
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 设置用户ID
     *
     * @param userId 用户ID
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 获取社区管理员ID
     *
     * @return admin_id - 社区管理员ID
     */
    public Integer getAdminId() {
        return adminId;
    }

    /**
     * 设置社区管理员ID
     *
     * @param adminId 社区管理员ID
     */
    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    /**
     * 获取评论时间
     *
     * @return publish_time - 评论时间
     */
    public Date getPublishTime() {
        return publishTime;
    }

    /**
     * 设置评论时间
     *
     * @param publishTime 评论时间
     */
    public void setPublishTime(Date publishTime) {
        this.publishTime = publishTime;
    }

    /**
     * 获取评论内容
     *
     * @return content - 评论内容
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置评论内容
     *
     * @param content 评论内容
     */
    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Admin getAdmin() {
        return admin;
    }

    public void setAdmin(Admin admin) {
        this.admin = admin;
    }
}